<%@ page language="java" import="java.util.*,com.bean.*,com.Dao.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String sessionValues=(String)session.getAttribute("username");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>回帖</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
     <div style="background-color:pink;float:left;width:20%;height:700px">
    <form>
        <input style="margin: 50px;width: 100px;height: 30px;" type="button" name="but1" value="讨论板块"><br/>


    </form>
</div>

<div style="background-color:green;float:left;width:80%;height:100px">
	
    <form>
    <table>
        <tr>
            <td>用户：</td>
            
            <td>
             <%=sessionValues %>
            </td>
           
            <td>
            <a href="./fatie.jsp"> 发帖</a>            
            </td>
            <td>
            <a href="./resetpwd.jsp">重置密码</a>
            </td>
            <td><a href="./deleteuser.jsp">注销</a></td>
        </tr>
    </table>
    </form>
    
</div>

<div style="background-color:white;float:left;width:80%;height:600px;align:center;">
<%
	List<AllHuitie> listHuitie = new ArrayList<AllHuitie>();
	listHuitie = HuitieDao.queryHuitieBy();
%>

    <table border="1" cellspacing="0" style="margin-top: 100px;margin-left: 300px;text-align: center;width:300px;height:100px;">
        <tr>

            <td>帖子内容</td>
            <td>发帖人</td>
            <td>最后修改时间</td>

       <%
      
    for(AllHuitie huitie : listHuitie) {
    	//		String n1=name;//这一行是为了获取记录集中的一行数据
    			%>
    			<tr>
    			<!--回帖内容 -->
    			
    			<td><a href="./index.jsp"><%=huitie.getHtnr() %></a></td>
    			<td><%=huitie.getHtr() %></td>
    			<td><%=huitie.getTime()%></td>
    			
    			</tr>
    			<%
    		}
    %>
    <tr>
    <td><a href="">回帖</a></td>
    </tr>
    </table>
</div>
  </body>
</html>
